#!/usr/bin/env python3
# -*-coding:utf-8-*-
import rospy
import std_msgs.msg
from geometry_msgs.msg import Twist, PoseStamped, TwistStamped







def local_pose_callback(data):
    global height
    height = data.pose.position.z   
    rospy.loginfo(height)

def local_velocity_callback(data):
    global v
    v = data.linear.x   
    rospy.loginfo("suduxiaoxi:"+v)

      


if __name__ == '__main__':

    rospy.init_node('submesg', anonymous=True)
    #sub = rospy.Subscriber("mavros/local_position/pose", PoseStamped, local_pose_callback,queue_size=1)
    sub2 = rospy.Subscriber("mavros/local_position/velocity_body", Twist, local_velocity_callback,queue_size=1)
    rospy.spin()
